package app;

import java.awt.Graphics;

import javax.swing.JComponent;
import javax.swing.JFrame;

import objects.twodimensional.Rectangle2D;

import com.dinim.graphics.GraphicsContextSwingImpl;
import com.dinim.graphics.IGraphicsContext;

public class ObjectTester {

	public static void main(String[] args) {
		JFrame f = new JFrame();

		f.add(new JComponent(){

			@Override
			public void paint(Graphics g) {
				super.paint(g);
				
				
				IGraphicsContext gc = new GraphicsContextSwingImpl(g);
				gc.setAntialiasing(true);
				
				Rectangle2D rect = new Rectangle2D(100, 100, 100, 100);

				rect.draw(gc);
				
				rect.rotate(27);
				
				rect.draw(gc);
				
				rect.scale(1.2,1.2);
				
				rect.draw(gc);
			}
			
		});

		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		f.setSize(400, 400);
		f.setVisible(true);
	}
	
}
